//该文件用来创建用户名的约束条件和模型对象
//引入mongoose模块
const mongoose = require('mongoose');
//创建约束条件
const Schema = mongoose.Schema;
const users_schema = Schema({
    user_name:{
        type:String,
        unique:true,
        required:true
    },
    password:{
        type:String,
        unique:false,
        required:true
    }
});
//创建模型对象
module.exports = mongoose.model('users',users_schema);
